

<div class="layui-form" lay-filter="back-role-form">
  <div class="layui-form-item">
    <label class="layui-form-label">角色名称</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="hidden" name="id" value="{{ d.params.id || '' }}">
        <input type="text" name="name" value="{{ d.params.name || '' }}" lay-verify="required" placeholder="请输入角色名" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">排序</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="sort" value="{{ d.params.sort || '' }}" placeholder="排序值" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">描述</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <textarea type="text" name="desc" autocomplete="off" class="layui-textarea">{{ d.params.desc || '' }}</textarea>
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="checkbox" lay-filter="switch" name="status" {{ d.params.status === 0 ? '' : 'checked' }} lay-skin="switch" lay-text="开启|禁用">
      </script>
    </div>
  </div>
  <div class="layui-form-item" style="text-align: center;">
    <button class="layui-btn" lay-submit lay-filter="back-role-form-submit">确认</button>
    <button class="layui-btn" type="button" id="layer-close">关闭</button>
  </div>
</div>

<script>
layui.use(['admin', 'form'], function(){
  var $ = layui.$
  ,form = layui.form;
  
});
</script>
